Get the list of members in "Dynamic distribution group"
Hi, How to get the list of group members in "Dynamic Distribution Group" with their Primary smtp address. Senthil KR
February 2nd, 2010 11:50pm

Senthil, Try thisThis can be done from ADUC , where as you can create a query to get all the users and then from add and remove coloumn , you can add email address and then export the list to a csv file.If you have the Saved query folder in teh Active Directory Users and computers Snap-in then you can do this:1. Right-Click the folder and select New query2. Give it a descriptive name3. Click Define Query4. From the drop down list select Custom Search5. Clcik Advanced tab6. Paste in the following:(&(objectCategory=user)(memberOf=cn=Domain Admins,cn=users,dc=YourDomain,dc=local))You will need to change the cn=..... part to suite your groups distinguished name.then once you save this and get a list you can:7. Right-click on your query 8. Select Export List (not Export Query definition as this just creates a backup of the query)9. Select from the save as type: Text (Comma Delimited) (*.csv)Which of course, opens in Excel as it is.Raj
Free Windows Admin Tool Kit Click here and download it now
February 2nd, 2010 11:56pm

Hi Rajnish, Thanks for reply. Need to export list of members with their primary smtp address for existing "Query based group mail id". I use the following shell command to export the same. $members = Get-DynamicDistributionGroup -Identity "dynamicgroupname" Get-Recipient -RecipientPreviewFilter $members.RecipientFilter > membersall.txt It gives me the list of members with their name. I need their email address. Please help me in this. where as i've tried your suggestion in ADUC. Its not listing the members. I get only empty excel sheet with columns " Name, Type & Descrption". Regards, Senthil KR
February 3rd, 2010 12:44am

You need add the coloumn and then add the email addresses from there. By default it will always show the above three fields.Raj
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2010 12:59am

How can i add the column and where? Senthil KR
February 3rd, 2010 2:44am

Check this script if this helps http://exchangepedia.com/blog/2005/09/how-to-export-all-email-addresses-from.htmlFor adding email address coloumn, go to ADUC, Click on view , add/remove coloumn and then scroll down to email address and add it.Raj
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2010 3:50am

Hi Rajnish,Thanks for reply.Need to export list of members with their primary smtp address for existing "Query based group mail id". I use the following shell command to export the same.$members = Get-DynamicDistributionGroup -Identity "dynamicgroupname"Get-Recipient -RecipientPreviewFilter $members.RecipientFilter > membersall.txtIt gives me the list of members with their name. I need their email address. Please help me in this.where as i've tried your suggestion in ADUC. Its not listing the members. I get only empty excel sheet with columns " Name, Type & Descrption".Regards,Senthil KR Hi Senthil,Add this "| select Displayname,PrimarySmtpAddress"$members = Get-DynamicDistributionGroup -Identity "dynamicgroupname"Get-Recipient -RecipientPreviewFilter $members.RecipientFilter | select Displayname,PrimarySmtpAddress > membersall.txtFrank Wang
February 3rd, 2010 4:38am

Thanks Frank... Its working fine. Great work... Senthil KR
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2010 5:45am

aaaarghhh.......This has been of tremendous help.Great work Frank.Wang
May 8th, 2010 7:08am

Senthil i think you are getting full list of users in your exchange organization.... it is not filtered...check your resultset. sanjay
Free Windows Admin Tool Kit Click here and download it now
July 26th, 2010 9:40pm

I get this error in Powershell Get-Recipient : Cannot validate argument on parameter 'RecipientPreviewFilter'. The argument is null or empty. Supply an argument that is not null or empty an d then try the command again. At line:1 char:108 + $members = Get-DynamicDistributionGroup -Identity "GroupName" | Get-Rec ipient -RecipientPreviewFilter <<<< $members.RecipientFilter > membersall.txt + CategoryInfo : InvalidData: (:) [Get-Recipient], ParameterBindi ngValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Excha nge.Management.RecipientTasks.GetRecipient We have populated the members of the Distribution group using a custom attibute. Any idea what we might be doing wrong while running the command
July 24th, 2011 4:32am

On Sun, 24 Jul 2011 08:32:14 +0000, Kitaab wrote: > > >I get this error in Powershell > >Get-Recipient : Cannot validate argument on parameter 'RecipientPreviewFilter'. The argument is null or empty. Supply an argument that is not null or empty an d then try the command again. At line:1 char:108 + $members = Get-DynamicDistributionGroup -Identity "GroupName" | Get-Rec ipient -RecipientPreviewFilter <<<< $members.RecipientFilter > membersall.txt + CategoryInfo : InvalidData: (:) [Get-Recipient], ParameterBindi ngValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Excha nge.Management.RecipientTasks.GetRecipient > >We have populated the members of the Distribution group using a custom attibute. > >Any idea what we might be doing wrong while running the command You're piping the results of the get-dynamicdistributiongroup into the get-recipient. Then you're trying to use an undefined "$members" variable. Two separate statements will work: $members = Get-DynamicDistributionGroup -Identity "GroupName" Get-Recipient -RecipientPreviewFilter $members.recipientpreviewfilter If you want them on one line, separate them with a semicolon. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2011 12:07pm

I receive the following error after running the second command: Get-Recipient : The argument cannot be null or empty. At line:1 char:38 + Get-Recipient -RecipientPreviewFilter <<<< $members.recipientpreviewfilter Any ideas? Thanks
July 30th, 2012 10:12am

I think there was a typo in Rich's post. Try these two commands: $members = Get-DynamicDistributionGroup <name> Get-Recipient -RecipientPreviewFilter $members.RecipientFilter Steve
Free Windows Admin Tool Kit Click here and download it now
July 30th, 2012 10:50am

I still get the same error. I am using the following commands: $members = Get-DynamicDistributionGroup -Identity "<name>" Get-Recipient -RecipientPreviewFilter $members.RecipientFilter Any ideas? Thanks
July 30th, 2012 10:57am

After running the first command, could you run the following and see what is returned: $members.RecipientFilter If you get nothing back then run this command: Get-DynamicDistributionGroup <name> | fl *filter
Free Windows Admin Tool Kit Click here and download it now
July 30th, 2012 11:15am

I have run the two commands as the first command gave no return, The second command showed a blank value for RecipientFilter and listed a value for the LdapRecipientFilter. I have pasted it below with some changes: (&(!cn=SystemMailbox{*})(&(&(&(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(!(homeMDB=*))(!(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=contact))(objectCategory=group)(objectCategory=publicFolder)(objectCategory=msExchDynamicDistributionList) )))(objectCategory=user)(physicalDeliveryOfficeName=City, ST)))) I want to believe to export the member list of this dynamic distribution group and also be able to add 2 members who do not fit the description of the filter. Any ideas? Thanks
July 30th, 2012 11:26am

On Mon, 30 Jul 2012 14:41:34 +0000, steve siyavaya wrote: > > >I think there was a typo in Rich's post. Try these two commands: $members = Get-DynamicDistributionGroup <name> >Get-Recipient -RecipientPreviewFilter $members.RecipientFilterSteve Darned copy-and paste! "-RecipientPreviewFilter $members.RecipientFilter" is what it _should_ have been. :-( --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
July 30th, 2012 12:25pm

On Mon, 30 Jul 2012 15:17:26 +0000, jsadmin wrote: >I have run the two commands as the first command gave no return, That's not good. What do you get if you use "$members | fl"? >The second command showed a blank value for RecipientFilter and listed a value for the LdapRecipientFilter. I have pasted it below with some changes: > >(&(!cn=SystemMailbox{*})(&(&(&(& (mailnickname=*) (| (&(objectCategory=person)(objectClass=user)(!(homeMDB=*))(!(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=user)(|(homeMDB=*)(msExchHomeServerName=*)))(&(objectCategory=person)(objectClass=contact))(objectCategory=group)(objectCategory=publicFolder)(objectCategory=msExchDynamicDistributionList) )))(objectCategory=user)(physicalDeliveryOfficeName=City, ST)))) > >I want to believe to export the member list of this dynamic distribution group and also be able to add 2 members who do not fit the description of the filter. > >Any ideas? Thanks How was that DDL created? If it has a LdapRecipientFilter but no RecipientFilter then it's probably an Exchange 2003 QBDL that needs attention. You should be able to set the same condition on the DDL with OPATH "Office='City, ST'". --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
July 30th, 2012 12:39pm

Rich, Your first assumption is correct as it has a LdapRecipientfilter but no RecipientFilter. the RecipientFilterType is set to Legacy. How can I update this group without effecting its mail properties (i.e. Membership and e-mail address)? I also want to be able to add two members who do not match the filter properties? How can I do that as well? Thank you.
Free Windows Admin Tool Kit Click here and download it now
July 30th, 2012 12:59pm

On Mon, 30 Jul 2012 16:50:46 +0000, jsadmin wrote: >Your first assumption is correct as it has a LdapRecipientfilter but no RecipientFilter. the RecipientFilterType is set to Legacy. How can I update this group without effecting its mail properties (i.e. Membership and e-mail address)? The filter looks like it's supposed to include any mail- or mail-box enabled AD objects that have a physicalDeliveryOfficeName of "City, State". For example: Set-DynamicDistributionGroup DDL01 -RecipientFilter "Office -eq 'Ada,OK'" >I also want to be able to add two members who do not match the filter properties? How can I do that as well? You can't. But what you *can* do is create a universal DL and add the DDL as a member. Then add the two other people to the DL. Hide the DDL from the GAL. Send the e-mail to the "regular" group. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
July 30th, 2012 3:48pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics